#ifndef CSKELETONNODE_H
#define CSKELETONNODE_H

///@todo do .cpp

/*
Basic element of the CSkeleton class
*/

using namespace irr;

namespace MarCore
{

namespace LivingEntity
{

class CSkeletonNode : public IReferenceCounted
{

    ///@todo keyframe animation, list of keyframes.
    keyframes

    ///@todo Change to irr list.
    CSkeletonNode* children;

    CSkeletonNode* parent;
    E_HOLDER_TYPE holder_type; //type of holder it is
    E_SKODE_SHAPE shape; //shape of the node
    f32 size; // 'how much' it can hold, more size specific than weight specific.
    bool native_grift; //is the node a bag? A non living attachment that can be shot, or is it a limb? etc.

public:

        //! Constructor
        CSkeletonNode(
            core::vector3df& pos,
            E_SKODE_SHAPE shape_,
            E_HOLDER_TYPE holder_type_,
            CSkeletonNode* parent_ = 0);

        //! Destructor
        ~CSkeletonNode(  );

        //! Updates children transforms&rotation based on transform&rotation of this node.
        void updateChildren(  );

        //! Adds a child of this node.
        void addChild( CSkeletonNode* new_child );

        //! Removes a child in the specfied index of this nodes children.
        void removeChild( /*param for where*/ );

        //! Overwrites existing child data at specified index with argument child data.
        void setChild( /*param for where*/, CSkeletonNode* new_child );

        //! Returns the pointer to the child object at the specified index.
        CSkeletonNode* getChildren(  );

        //! Sets the parent of this node. Redraw debug line?
        void setParent( CSkeletonNode* new_parent );

        //! Gets and returns pointer to parent object.
        CSkletonNode* getParent( );

}; //end class CSkeletonNode

enum E_HOLDER_TYPE //type of holder it is
{

    E_NOT_HOLDER, //not a holder

    E_HAND_HOLDER, //grabbing things with a hand, tentacle or claws

    E_POUCH_HOLDER, // things like a purse, backpack, or sack

    E_HANDPOUCH_HOLDER, //both hand and pouch holder

    E_DUMMY_HOLDER = 0

}; //end enum E_HOLDER_TYPE

enum E_SKODE_SHAPE
{

    E_SKODE_NONE,

    E_SKODE_BOX, //cube, box

    E_SKODE_SPHERE, //sphere

    E_SKODE_CAPSULE, //capsule, pill shaped

    E_SKODE_CONE, //cone

    E_SKODE_TETRA, //terahedron

    E_SKODE_DUMMY

};

}; //end namespace LivingEntity
}; //end namespace MarCore

#endif ///CSKELETONNODE_H
